<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <title>Easy Travel Planner</title>

    <link rel="stylesheet" type="text/css" href="stylesheets/common.css" />
    <link rel="stylesheet" type="text/css" href="stylesheets/result.css" />
    <link rel="stylesheet" type="text/css" href="stylesheets/smoothness/jquery-ui-1.8.16.custom.css" />

    <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="js/planner.js"></script>
    <script type="text/javascript">
    <!--
    $(function () {
      var global_spot_reorder =
        new planner.SpotReorder($("#SelectedSpotsReorderList"),
                                $("#SelectedSpots"),
                                $("#SelectedSpotsReorderForm"));
    });
    -->
    </script>
  </head>

  <body>
    <div id="Container">
      <div id="Header">
        <div class="HeaderLeft">
          <h1><a href="/">Easy Travel Planner</a></h1>
        </div>
        <div class="Cleaner"></div>
      </div>

      <div id="Body">
        
        <h2>排程結果</h2>
        <table>
          <tr>
            <th>交通工具</th>
            <th>地點</th>
          </tr>

          {% for slot in timeTable %}
          <tr>
            {% ifequal slot.type "Play" %}
               <td colspan=2 class="play">好好在{{ slot.where }}玩玩吧!!</td>
            {% else %}
               <td>{{ slot.how }}</td>
               <td>{{ slot.location }}</td>
            {% endifequal %}
          </tr>
          {% endfor %}
        
        <!--
        <table align="center">
            <tr>
                <th>交通方式</th>
                <th>起點站</th>
                <th>終點站</th>
            </tr>
            #% for event in timeTable %#
                <tr>
                #% ifequal event.type "play" %#
                    <td colspan=3 class="play">好好在## event.where ##用## event.money ##玩個## event.time ##分鐘吧!!</td>
                #% else %#
                    <td class="trans">## event.how ##</td>
                    <td class="trans">## event.begin ##: ## event.2 ##</td>
                    <td class="trans">## event.end ##</td>
                #% endifequal %#
                </tr>
            #% endfor %#
            -->
        </table>

        <h2>調整景點順序</h2>
        <p>如果您不滿意上述各景點的順序，您可以調換以下的景點順序：</p>

        <form method="POST" id="SelectedSpotsReorderForm">
          <ul id="SelectedSpotsReorderList">
            {% for spot in spots %}
            <li id="SPOT_{{ spot.key }}">{{ spot.name }}</li>
            {% endfor %}
          </ul>
          <input type="hidden" name="Ordered" id="Ordered" value="1" />
          <input type="hidden" name="SelectedSpots" id="SelectedSpots" />
          <input type="image" src="fig/restart.png" />
        </form>

        <div id="Footer">
          <p>AI PROJECT<br/>Copyright &copy; 2012 by 林自均、林明萱、簡子翔</p>
        </div>
      </div>
    </div>
  </body>
</html>
